package com.ruoyi.project.bi.domain.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.project.bi.domain.common.BaseEntity;
import com.ruoyi.project.bi.util.RSBIUtils;
import lombok.Data;

import java.util.Date;

@TableName("bi_dataset")
@Data
public class Dataset extends BaseEntity {

	@TableId(value = "dset_id",type = IdType.AUTO)
	private String dsetId;
	/** 数据源ID */
	@TableField(value = "ds_id")
	private String dsid;
	private String dsname;
	/** 数据源链接方式 */
	private String useType;
	private String name;
	private String cfg;
	private Date crtdate;
	@TableField(value = "primary_table")
	private String priTable;

	@Override
	public void validate() {
		this.dsname = RSBIUtils.htmlEscape(this.dsname);
		this.name = RSBIUtils.htmlEscape(this.name);
	}
}
